Spawn game as parent process #601
Draft
Xnick417x wants to merge 10 commits into
Draft
Conversation
The scanout size guard rejected frames smaller than the window, falling back to a CPU copy of a GPU-only buffer that drew nothing. Allow scanout of smaller frames and scale the presented source span to fill the window instead of cropping.
Games that switch resolution showed a black screen because the game ran as a child of the winhandler.exe desktop shell. Add winlauncher.exe to the container and launch the game through it so it runs as a decoupled top-level process; winhandler stays the shell and keeps handling input.
Pass /affinity to the launch helper so the game is pinned to the container's CPU set from process start, before the per-window affinity applies.
…ervice The game now launches under winlauncher.exe as the wine desktop shell, while winhandler.exe runs as a separate input/process service, instead of the game running as a child of winhandler.exe.
The in-process Steam launcher received the game exe on argv[1], but the desktop shell splits that argument on the first space, so a path like C:\Program Files (x86)\... arrived as C:\Program. The launcher then never matched the running game and never emitted a launch-complete marker, so the preloader hung until the watchdog killed the session. Pass the game exe to the launcher via the WN_STEAM_GAME_EXE environment variable (argv[1] kept as fallback) so the shell launches a bare steam.exe with no space-bearing argument to split.
The background input service now runs with a persistent idle child (wn-idle.exe, staged into the container on boot) so its default file manager never launches during shortcut or Steam sessions; container boots without a target still open the file manager as before. Bring-to-front raises the process window directly in the X server, so it works for any requesting process; the guest-side request is kept as a fallback.
…sses Replace the prebuilt launcher and the idle helper with a single WN-launcher.exe: it acts as the desktop shell and, with /idle, as the input service's keep-alive child. The shell now starts winhandler as its own child so the service shares the game's virtual desktop. Previously winhandler ran as a separate top-level process on the default desktop, so its input injection, process spawning and bring-to-front never reached the game; relative mouse, task-manager 'new task' and bring-to-front now work. This also leaves a single launcher stub in the session instead of two. The task manager refuses to end required system processes so the session can no longer be torn down by ending its own plumbing.
WN-launcher runs the game and input service in kill-on-close jobs and force-ends a windowless leftover, so exiting the game tears down the whole tree (game, its popups, winhandler) and returns to the app instead of black-screening. Task-manager bring-to-front resolves the window HWND, focuses it, and matches every WM_CLASS token, so it raises reliably without emptying the process list. close-kill escalates to SIGKILL when a closed window's process ignores SIGTERM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.